import { MutationTree } from "vuex"
import { IUserState } from "./types";
import { LocalCache } from "@/utils/localCache"
import { IUserInfo } from "./types";
import router from "@/router"
const mutations:MutationTree<IUserState> = {
    saveUserInfo(state, payload:IUserInfo,
    ) {
        state.userInfo = payload;
        LocalCache.setItem("userInfo", payload);
           router.push("/")
            
    }
}

export {
    mutations
}